package cn.codeforfun.cloud.center.core;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;

@RestController
@Slf4j
public class CoreController {

    @PostMapping("/api/register")
    public void register(@RequestBody Map<String, Object> parameter) {
        Object applicationName = parameter.get("applicationName");
        String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        log.info("{} applicationName:{}", format, applicationName);
    }
}
